]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
background: Fix a bug with empty animations
authorJasper St. Pierre <jstpierre@mecheye.net>
Thu, 14 Mar 2013 21:06:17 +0000 (17:06 -0400)
committerJasper St. Pierre <jstpierre@mecheye.net>
Thu, 14 Mar 2013 21:48:07 +0000 (17:48 -0400)
Arrays always evaluate to true, even empty arrays,
so we need to check the length to make sure we have
no files.

https://bugzilla.gnome.org/show_bug.cgi?id=695882

js/ui/background.js

index e86dd6e07db42be873d6e8148d2b61611c60cabf..bfe06a526f5cd29797ebba72ba09e8e879488be4 100644 (file)
@@ -387,7 +387,7 @@ const Background = new Lang.Class({
         this._animation.update(this._layoutManager.monitors[this._monitorIndex]);
         let files = this._animation.keyFrameFiles;
 
-        if (!files) {
+        if (files.length == 0) {
             this._setLoaded();
             this._queueUpdateAnimation();
             return;